﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="desktop.aspx.cs" Inherits="FL.Web.BackEnd.BasePage" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改密码</title>
    <link href="/styles/form.common.css" rel="stylesheet" />
</head>
<script src="/SFramework/boot.js"></script>
<body>
    <form id="form" runat="server">
     <table style="width: 99%;"> 
     <tr>
         <td class="theader">新密码</td>
                      <td>
                             <input id="password1" name="password1" type="password"  allowinput="true" shownullitem="false"  style="width: 100%;"/>
                     </td>
                    </tr>
         <tr>
                        <td class="theader">再次新密码</td>
                        <td>
                             <input id="password2" name="password2" type="password" allowinput="true" shownullitem="false" style="width: 100%;"/>
                     </td>
     </tr>
 </table>
    </form>
    <div class="toolbar">
        <button id="btnSave">确定</button>
        <button id="btnCancel">取消</button>
    </div>
</body>
<script src="/scripts/app/edit.common.js"></script>
<script src="/Scripts/common/jquery.action.js"></script>
<script type="text/javascript">
    var fnCustomSave = function () {
        fnChangePassword();
    }


    var fnChangePassword = function () {
        var password1 = $("#password1").val();
        var password2 = $("#password2").val();
        if (password1 == password2 && password1 != "") {
            fnRunProc("usp_set_user_password", getPar('id')+","+password1);
        }
        else {
            if (password1 == "") {
                alert("密码不能为空!");
                return;
            }
            if (password1 != password2) {
                alert("二次必须一致!")
                return;
            }
            if (password1.indexOf(",") > 0) {
                alert("密码不要含有分号','!");
                return;
            }
        }
    }


    var fnClose = function () {
        window.CloseOwnerWindow();
    };

</script>
</html>
